{% extends "admin/index.html" %}
{% from "macros.html" import render_pagination %}

{% block title %}
Admin - lives
{% endblock %}

{% block operation %}
<a href="{{ url_for('admin.create_live') }}" type="button" class="btn btn-primary">
  <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
  添加直播
</a>
{% endblock %}

{% block admin %}
<table class="table">
  <thead>
    <tr>
      <th>直播ID</th>
      <th>直播名称</th>
      <th>直播用户ID</th>
    </tr>
    <tbody>
      {% for live in pagination.items %}
      <tr>
        <td>{{ live.id }}</td>
        <td>{{ live.name }}</td>
        <td>{{ live.user_id }}</td>
      </tr>
      {% endfor %}
    </tbody>
  </thead>
</table>
{{ render_pagination(pagination, 'admin.lives') }}
{% endblock %}
